package biz.yfsoft.app.fastframework.kit;

import java.io.IOException;
import java.util.Properties;

public class RuntimeKit {

	public static boolean exec(String cmd) {
		try {
			Runtime rt = Runtime.getRuntime();
			rt.exec("cmd /c " + cmd);
			return true;
		} catch (IOException e) {
			e.printStackTrace();
		}
		return false;
	}
	
	public static boolean exec(String[] cmds) {
		try {
			Runtime rt = Runtime.getRuntime();
			rt.exec(cmds);
			return true;
		} catch (IOException e) {
			e.printStackTrace();
		}
		return false;
	}
	
	public static boolean isLinux(){
		Properties props=System.getProperties();
		String osV = props.getProperty("os.name");
		System.out.println(osV);
		return "Linux".equals(osV);
	}
}
